package com.dynabook.ems.model.dto.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 批量处理工单申请请求DTO
 *
 * @author system
 * @date 2025-01-28
 */
@Data
@ApiModel("批量处理工单申请请求")
public class WorkOrderBatchRejectRequest {

    /**
     * 工单ID列表
     */
    @ApiModelProperty(value = "工单ID列表", required = true)
    @NotEmpty(message = "工单ID列表不能为空")
    private List<String> workOrderIds;

    /**
     * 操作类型：agree-同意，reject-拒绝
     */
    @ApiModelProperty(value = "操作类型", required = true, example = "agree", allowableValues = "agree,reject")
    @NotBlank(message = "操作类型不能为空")
    @Pattern(regexp = "^(agree|reject)$", message = "操作类型只能是agree或reject")
    private String actionType;

    /**
     * 拒绝原因（拒绝时可选）
     */
    @ApiModelProperty(value = "拒绝原因")
    @Size(max = 500, message = "拒绝原因不能超过500个字符")
    private String rejectReason;
}